<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="/includes/header.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title><fmt:message key="title.short" /></title>
<link href="${pageContext.request.contextPath}/css/main.css"
	rel="stylesheet" />
<link href="http://twitter.github.com/bootstrap/assets/css/docs.css"
	rel="stylesheet" />
<link
	href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"
	rel="stylesheet" />
<link
	href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css"
	rel="stylesheet" />
</head>
<body>
	<%@include file="/includes/navbar.jsp"%>

	<div class="container">
		<div class="row">
			<div class="span8">
										
				<form class="form-horizontal" form id="newpost" method="post"
					action="PostController" novalidate="novalidate">
					<input type="hidden" name="lang" value="${param.lang}"/>
					<c:choose>
						<c:when test="${param.sectionName != null}">
							<input type="hidden" name="sectionName" value="${param.sectionName}" />
							<c:set var="createNew" value="topic"></c:set>
						</c:when>
						<c:otherwise>
							<input type="hidden" name="topicId" value="${param.topicId}" />
							<c:set var="createNew" value="post"></c:set>
						</c:otherwise>
					</c:choose>
					
					<fieldset>
						<legend style="font-weight: bold;">Create new ${createNew}</legend>
						<div class="control-group">
							<label style="font-weight:bold; font-size:medium;" class="control-label" for="text"><fmt:message key="topictitle"/></label>  
							<div class="controls">
								<input type="text" class="input-xlarge" id="text"
									name="post_title" style="width: 470px;">
							</div>
						</div>
						
						<div class="control-group">
							<label style="font-weight:bold; font-size:medium;" class="control-label" for="text">Description</label>  
							<div class="controls">
								<input type="text" class="input-xlarge" id="text"
									name="post_description" style="width: 740px;">
							</div>
						</div>
						
						<div class="control-group">
							<div class="controls">
								<textarea class="input-xlarge" id="textarea" rows="3"
									style="margin: 0px; width: 750px; height: 490px;"
									name="content"></textarea>
							</div>
						</div>
						
						<div class="pull-right">
							<button type="submit" class="btn">
								<fmt:message key="save" />
							</button>
							<button class="btn">
								<fmt:message key="cancel" />
							</button>
						</div>	
					</fieldset>
				</form>
			</div>

			<%-- <div class="span10">
				<h5>${param.postTitle}</h5>
				<br /> ${param.postContent}
				<h5>Posted on: ${param.datePosted}</h5>
			</div> --%>
		</div>
	</div>
	<%@include file="/includes/footer.jsp"%>
</body>

<script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-alert.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-modal.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-scrollspy.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tab.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tooltip.js"></script>
<script
	src="http://twitter.github.com/bootstrap/assets/js/bootstrap-popover.js"></script>
<script type="text/javascript"
	src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>

<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/tiny_mce/tiny_mce.js"></script>

<script type="text/javascript">
	tinyMCE.init({
		mode : "textareas"
	});
</script>
</html>